home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 201 / DPCS1104.ISO / Full / QuickBooks / QBTutor / Lesson4 / Lesson4.dcr / 00171_C-J field selected and jump.ls < prev    next >
Encoding:
Text File  |  2001-02-01  |  1.1 KB  |  40 lines

  1. property pDeviantTarget, spriteNum
  2. global immutableCustomers, mutableCustomers
  3.  
  4. on getPropertyDescriptionList
  5.   description = [:]
  6.   addProp(description, #pDeviantTarget, [#default: EMPTY, #format: #string, #comment: "Not In List Target:"])
  7.   return description
  8. end
  9.  
  10. on doListSelect
  11.   unfound = "TRUE"
  12.   repeat with i = 1 to immutableCustomers.count
  13.     if immutableCustomers[i].Customer = sprite(spriteNum).member.text then
  14.       doFillInvoice(immutableCustomers[i])
  15.       unfound = "FALSE"
  16.       exit repeat
  17.     end if
  18.   end repeat
  19.   if unfound = "TRUE" then
  20.     repeat with i = 1 to mutableCustomers.count
  21.       if mutableCustomers[i].Customer = sprite(spriteNum).member.text then
  22.         doFillInvoice(mutableCustomers[i])
  23.         unfound = "FALSE"
  24.         exit repeat
  25.       end if
  26.     end repeat
  27.   end if
  28.   if unfound <> "FALSE" then
  29.     go(pDeviantTarget)
  30.   end if
  31. end
  32.  
  33. on doFillInvoice corpse
  34.   member("field:Bill To").text = corpse.BillTo
  35.   member("field:Ship To").text = corpse.ShipTo
  36.   member("field:Terms").text = corpse.Terms
  37.   member("field:Rep").text = corpse.Rep
  38.   go("Pick Cust.")
  39. end
  40.